package com.hjqjl.whdemo.base;

/**
 * 请求结果基类   所有请求结果继承此类
 */

public class BaseResponseModel {
    private int code;
    private String message;

    public int getCode() {
        return code;
    }

    public void setCode(int code) {
        this.code = code;
    }

    public String getMessage() {
        return message;
    }

    public void setMessage(String message) {
        this.message = message;
    }

    //请求成功
    public boolean net_success() {
        return code == 200;
    }

    @Override
    public String toString() {
        final StringBuffer sb = new StringBuffer("BaseResponseModel{");
        sb.append("code=").append(code);
        sb.append(", message='").append(message).append('\'');
        sb.append('}');
        return sb.toString();
    }
}
